<%-- 
    Document   : addPrizeType
    Created on : 13-08-2014, 22:30:05
    Author     : NGOCLINH-PC
--%>

<%@page import="java.util.ArrayList"%>
<%@page import="Data.PrizeType"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>

        <div class="tablemember">
            <form action="../PrizeTypePR" method="post" name="formmember">
                <h2 style="padding: 10px; color: #999;">Management PrizeType</h2>
                <hr />
                <table width="100%" border="0" align="center" cellpadding="14" cellspacing="14">
                    <%
                        if (request.getParameter("EprizetypeID") != null) {
                            PrizeType ct = new PrizeType();
                            int payID = Integer.parseInt(request.getParameter("EprizetypeID"));
                            ArrayList<PrizeType> a = ct.PTselectById(payID);
                            if (a.size() > 0) {
                                for (int i = 0; i < a.size(); i++) {
                                    PrizeType pay = a.get(i);
                    %>
                    <tr>
                        <td width='10%'>PayID</td>
                        <td width='50%'><label for='txtcateid'></label>
                            <% out.print("<input type='text'  readonly name='txtcateid' id='txtcateid' value='" + pay.getPrizeTypeID() + "' /></td>");%>
                    </tr>

                    <tr>
                        <td width="10%">PayType Name:</td>
                        <td width="57%"><label for="txtdanhmuc"></label>
                            <% out.print("<input type='text' required name='txtdanhmuc' id='txtdanhmuc' value='" + pay.getPrizeTypeName() + "'/></td>");%>
                    </tr>
                    <tr>
                        <td>Status:</td>
                        <%
                            if (pay.getStatus() == 1) {
                                out.print("<td><input type='radio' name='radio1' id='rdtrangthai' value='1' checked />");
                                out.print(" Show ");
                                out.print("<input type='radio' name='radio1' id='rdtrangthai' value='0' />");
                                out.print("Hidden</td>");
                            } else {
                                out.print("<td><input type='radio' name='radio1' id='rdtrangthai' value='1' />");
                                out.print(" Show ");
                                out.print("<input type='radio' name='radio1' id='rdtrangthai' value='0' checked />");
                                out.print("Hidden</td>");
                            }
                        %>
                    </tr>
                    <tr align="">
                          <td></td>
                        <td ><input type="submit" name="btnsubmit" id="btnsubmit" value="Submit" />
                          </td>
                    </tr>
                    <%
                            }
                        }
                    } else {
                    %>
                    <tr>
                        <td width="10%">PayType Name:</td>
                        <td width="57%"><label for="txtdanhmuc"></label>
                            <input type="text" required name="txtdanhmuc" id="txtdanhmuc" value=""/></td>
                    </tr>

                    <tr>
                        <td>Status:</td>
                        <td><input type="radio" name="radio1" id="rdtrangthai" value="1" checked />
                            Show 
                            <input type="radio" name="radio1" id="rdtrangthai" value="0"  checked />
                            Hidden</td>
                    </tr>
                    <tr align="">
                          <td></td>
                        <td><input type="submit" name="btnsubmit" id="btnsubmit" value="Submit" />
                            </td>
                    </tr>

                    <% }%>    
                </table>

            </form>
        </div>
